import api from '../api'
import shop from '../api/shop'
import * as types from './mutation-types'
import { saveCookie,signOut } from '../utils/authService'
import img from '../assets/img/shanghai.jpg'

export const getUser = (store, user) => {
    console.log('in action', store, user);
    api.getUser(user);
}

export const getAllProducts = ({ dispatch }) => {
    shop.getProducts(products => {
        dispatch(types.RECEIVE_PRODUCTS, products)
    })
}
